import com.buyingtickets.service.UnitIntervalBiz;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.StringUtils;

import javax.annotation.Resource;

/**
 * @author czl
 * @version 1.0
 * @description: TODO
 * @date 2021/6/29 19:19
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/applicationContext.xml")
public class a {
    @Resource
    private UnitIntervalBiz unitIntervalBiz;
    @Test
    public void  a(){
        System.out.println(unitIntervalBiz.queryByID(11));
    }
    @Test
    public void aa(){
        System.out.println(StringUtils.isEmpty(""));//是否为空，空返回true
        System.out.println(StringUtils.hasText(" 2 "));//是否为空，空返回false
        //有空格
        System.out.println(StringUtils.isEmpty(" "));
        System.out.println(StringUtils.hasText(" "));
        //任意字符
        System.out.println(StringUtils.isEmpty(" ' "));
        System.out.println(StringUtils.hasText(" '' "));
        System.out.println(StringUtils.isEmpty(" 1 "));
        System.out.println(StringUtils.hasText(" 2 "));
    }
}
